

function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; 
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';

	function BrowserCheck() {
	appname = navigator.appName;
	useragent = navigator.userAgent;
	 if(appname == "Microsoft Internet Explorer") appname = "IE";
	 IE55 = (useragent.indexOf('MSIE 5.5')>0);  
	 IE6 = (useragent.indexOf('MSIE 6')>0);     

	 if(appname=="IE" && IE55 || IE6) vars = 'ieVer=6'; 
	 else vars= 'ieVer=7';
	}
	onload=BrowserCheck;





	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";


	document.write(flashStr);
}

function LoadImg(img, idx2, idx3) {
 var d=new Object();
    var imgInfo = new Image(); 
    imgInfo.src = img; 
	 d.wd=idx2; 
	 d.ht=idx3; 
	 x= d.wd;
	 y= d.ht;
	 var winl = (screen.availwidth - x) / 2;
	 var wint = (screen.availheight - y) / 2 - (screen.height-screen.availheight);
   window.open('pop.html?'+img,'','width='+x+',height='+y+',top='+wint+',left='+winl+',scrollbars=0,resizable=0');

}

function go(img, idx2, idx3){
   var img,x,y,x1,y1
   aa=LoadImg(img, idx2, idx3);
   x= aa.wd;
   y= aa.ht;

          x1=x;
          y1=x; 
       if (x<x1) { 
          x1=x;
       } 

       if (y<y1) {
          y1=y;
       }
   // window.open('pop.htm?'+img,'','width='+x1+',height='+y1+',top=0,left=00,scrollbars=0,resizable=0');  
}
